﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KPIS.GERP.GBMS.IBLL;
using KPIS.GERP.GBMS.MODEL;
using KPIS.GERP.GBMS.DAL;
using KPIS.GERP.GBMS.DALFactory;
using System.Data;
namespace KPIS.GERP.GBMS.BLL
{
    public class BGMKPIResultListBLL : IBGMKPIResultListBLL
    {
        private static readonly IBGMKPIResultListDAL dal = DataAccess.CreateBGMKPIResultList();

        public int LoadYearType()
        {
            return dal.LoadYearType();
        }

        public List<MODEL.BGMKPI> LoadGridKpiTarget(int intTargetSeq)
        {
            return dal.LoadGridKpiTarget(intTargetSeq);
        }

        public DataTable SearchTarget(int intKpiSeq)
        {
            return dal.SearchTarget(intKpiSeq);
        }

        public DataTable ListJobsiteKPI()
        {
            return dal.ListJobsiteKPI();
        }

        public DataTable ListBgmProjSeq(int intYear, int intJobsite, int intProjectType)
        {
            return dal.ListBgmProjSeq(intYear, intJobsite, intProjectType);
        }

        public DataTable ListSubActKPI(int intYear)
        {
            return dal.ListSubActKPI(intYear);
        }

        public DataTable ListMainActKPI(int intYear)
        {
            return dal.ListMainActKPI(intYear);
        }

        public DataTable ListOutputKPI(int intYear)
        {
            return dal.ListOutputKPI(intYear);
        }

        public DataTable ListTargetKPI()
        {
            return dal.ListTargetKPI();
        }

        public DataTable LoadKPIListType()
        {
            return dal.LoadKPIListType();
        }

        public DataTable GridProject(int nStratType, int nTargetType, int nProjectID)
        {
            return dal.GridProject(nStratType, nTargetType, nProjectID);
        }

        public DataTable GetProject(int intKpiSeq)
        {
            return dal.GetProject(intKpiSeq);
        }

        public DataTable GetKPIListType()
        {
            return dal.GetKPIListType();
        }

        public DataTable GetData(int intKpiSeq, int intTargetDetSeq)
        {
            return dal.GetData(intKpiSeq, intTargetDetSeq);
        }

        public DataTable GetName(int kpi_seq, int bgm_strat_list_seq, int kpi_list_type_seq)
        {
            return dal.GetName(kpi_seq, bgm_strat_list_seq, kpi_list_type_seq);
        }

        public void KPIUpdate(int intKpiSeq, string strKpiName, string strDescription, int intKpiTypeSeq,
                              string strKpiUnit, Nullable<int> intWeight)
        {
            dal.KPIUpdate(intKpiSeq, strKpiName, strDescription, intKpiTypeSeq, strKpiUnit, intWeight);
        }

        public void UpdateTarget(int strKpiDetSeq, double? dblKpiDetResult, string created_by)
        {
            dal.UpdateTarget(strKpiDetSeq, dblKpiDetResult, created_by);
        }
    }
}
